package cglib;

import net.sf.cglib.proxy.CallbackFilter;

import java.lang.reflect.Method;

/**
 * @ClassName MyCallbackFilter
 * @Description
 * @Author lichuanqi
 * @Date 2022/5/9 19:38
 * @Version 1.0
 **/
public class MyCallbackFilter implements CallbackFilter {
    @Override
    public int accept(Method method) {
        String name = method.getName();
        if ("sayHello".equals(name)){
            return 0;
        }else {
            return 1;
        }
    }
}
